import axios from "axios";
/* 添加数据 */
export const addUser = (user) => {
    return axios.post(`/user?data=${JSON.stringify(user)}`)
}

export const addLoginUser = (user) => {
    return axios.post(`/login?data=${JSON.stringify(user)}`)
}

export const addCustomer = (customer) => {
    return axios.post(`/customer?data=${JSON.stringify(customer)}`)
}

export const addBankRecord = (bankRecord) => {
    return axios.post(`/bank?data=${JSON.stringify(bankRecord)}`)
}

export const addRecord = (record) => {
    return axios.post(`/record?data=${JSON.stringify(record)}`)
}

export const addRole = (role) => {
    return axios.post(`/role?data=${JSON.stringify(role)}`)
}

export const addRoleWithRight = (roleId, data) => {
    return axios.post(`/role_right/${roleId}?data=${JSON.stringify(data)}`)
}

export const addDepartment = (data) => {
    return axios.post(`/department?data=${JSON.stringify(data)}`)
}

export const addAudit = (data) => {
    return axios.post(`/audit?data=${JSON.stringify(data)}`)
}

export const addCirculation = (data) => {
    return axios.post(`/circulation?data=${JSON.stringify(data)}`)
}

export const addChannel = (data) => {
    return axios.post(`/channel?data=${JSON.stringify(data)}`)
}

export const addType = (data) => {
    return axios.post(`/type?data=${JSON.stringify(data)}`)
}

export const addRisk = (data) => {
    return axios.post(`/risk?data=${JSON.stringify(data)}`)
}

export const addLocation = (data) => {
    return axios.post(`/location?data=${JSON.stringify(data)}`)
}

export const addCategory = (data) => {
    return axios.post(`/category?data=${JSON.stringify(data)}`)
}

export const addService = (data) => {
    return axios.post(`/service?data=${JSON.stringify(data)}`)
}

export const addCategoryService = (data) => {
    return axios.post(`/category_service?data=${JSON.stringify(data)}`)
}